package com.chinacoal.microservice.impl.service;

import com.chinacoal.microservice.api.model.ApproveTaskParam;
import com.chinacoal.microservice.api.model.ForeignTaskParam;
import com.chinacoal.microservice.api.model.resource.BusinessData;
import com.chinacoal.microservice.util.result.Result;
import org.springframework.http.ResponseEntity;

/**
 * @Description: 集团ERP系统待办集成处理
 * @author linp
 * @date 2020年4月21日 下午3:56:56
 * @version V1.0
 */
public interface ErpTaskService {

    /**
     * 获取明细
     * @param foreignTaskParam
     * @return
     * @throws Exception
     */
    public Result<BusinessData> getErpDetail(ForeignTaskParam foreignTaskParam) throws Exception;

    /**
     * ERP审批
     * @param approveTaskParam
     * @return
     * @throws Exception
     */
    public Result<BusinessData> approveTask(ApproveTaskParam approveTaskParam) throws Exception;

    /**
     * ERP转发
     * @param approveTaskParam
     * @return
     * @throws Exception
     */
    public Result<BusinessData> erpForward(ApproveTaskParam approveTaskParam) throws Exception;

    /**
     * 附件下载
     * @param fileId
     * @return
     * @throws Exception
     */
    public ResponseEntity<byte[]> downloadAttach(String fileName, String fileId) throws Exception;

}
